# -*-coding:utf-8 -*-
#
# Created on 2019/5/13, by felix
#

import django_filters

from .models import CommandInfo


class CommandInfoFilter(django_filters.FilterSet):
    # name = django_filters.CharFilter()  # 全局匹配
    name = django_filters.CharFilter(lookup_expr='contains')  # 模糊匹配
    desc = django_filters.CharFilter(lookup_expr='contains')

    class Meta:
        model = CommandInfo
        fields = ('name', 'desc')
